package com.example.simpleweb;

import io.vertx.core.Vertx;
import io.vertx.core.http.HttpServer;
import io.vertx.core.http.HttpServerResponse;

public class Main {

    public static void main(String[] args) {
        Vertx vertx = Vertx.vertx();
        HttpServer server = vertx.createHttpServer();

        server.requestHandler(r -> {
            HttpServerResponse response = r.response();

            response.putHeader("Content-type", "application/json");

            response.end("hello world vertx");
        });

        server.listen(8081);
    }
}
